package com.highcom.dao;

import com.highcom.domain.Account;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AccountMapper {

    @Delete(" delete from account where id=#{id}")
    void delete(Integer id);

    @Insert("insert into account values (#{id},#{name},#{money})")
    void save(Account acoount);

    @Update("update account set name=#{name},money=#{money}   where id=#{id}")
    void update(Account acoount);

    @Select("select * from account where id=#{id}")
    Account findById(Integer id);

    @Select("select * from account")
    List<Account> findAll();


}
